import type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import KxAcceptanceStatisticsBarChart from "./index";

const meta = {
  title: "柱状图/可信验收统计柱状图-KxAcceptanceStatisticsBarChart",
  component: KxAcceptanceStatisticsBarChart,
  tags: ["autodocs"],
  argTypes: {},
  decorators: [
    (Story) => (
      <div
        style={{ backgroundColor: "#06112B", height: "354px", width: "742px" }}
      >
        <Story />
      </div>
    ),
  ],
} satisfies Meta<typeof KxAcceptanceStatisticsBarChart>;

export default meta;
type Story = StoryObj<typeof meta>;

export const basic: Story = {
  args: {
    dataSource: [
      {
        name: "马銮湾保障房地铁社区二期A01~03地块",
        unitAmount: 570,
        segmentAmount: 300,
        subSegmentAmount: 100,
        projectAmount: 90,
        batchAmount: 110,
      },
      {
        name: "马銮湾保障房地铁社区二期A04~07地块",
        unitAmount: 780,
        segmentAmount: 400,
        subSegmentAmount: 70,
        projectAmount: 300,
        batchAmount: 210,
      },
      {
        name: "保障性住房龙泉公寓一期",
        unitAmount: 570,
        segmentAmount: 150,
        subSegmentAmount: 200,
        projectAmount: 300,
        batchAmount: 60,
      },
      {
        name: "洪茂居住区一期",
        unitAmount: 320,
        segmentAmount: 250,
        subSegmentAmount: 90,
        projectAmount: 300,
        batchAmount: 70,
      },
      {
        name: "东园保障性住房",
        unitAmount: 320,
        segmentAmount: 250,
        subSegmentAmount: 90,
        projectAmount: 300,
        batchAmount: 70,
      },
    ],
  },
};
